import request from '@/utils/request.js'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    // headers: {} axios默认会携带请求头Content-Type: 'applicaiton/json'
    // Content-Type: 'applicaiton/json' -> 请求体里参数名和值会变成JSON字符串格式给后台
    data: data
  })
}

export function getProFile() {
  return request.post('/sys/profile')
}

export function getUserDetailById(id) {
  return request.get(`/sys/user/${id}`)
}
